Optimal. Leaf size=86 \[ \frac {a^{3/2} \tanh ^{-1}\left (\frac {\sqrt {a} \sin (e+f x)}{\sqrt {a+b}}\right )}{b^2 f \sqrt {a+b}}-\frac {(2 a-b) \tanh ^{-1}(\sin (e+f x))}{2 b^2 f}+\frac {\tan (e+f x) \sec (e+f x)}{2 b f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.12, antiderivative size = 86, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {4147, 414, 522, 206, 208} \[ \frac {a^{3/2} \tanh ^{-1}\left (\frac {\sqrt {a} \sin (e+f x)}{\sqrt {a+b}}\right )}{b^2 f \sqrt {a+b}}-\frac {(2 a-b) \tanh ^{-1}(\sin (e+f x))}{2 b^2 f}+\frac {\tan (e+f x) \sec (e+f x)}{2 b f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 208
Rule 414
Rule 522
Rule 4147
Rubi steps
\begin {align*} \int \frac {\sec ^5(e+f x)}{a+b \sec ^2(e+f x)} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {1}{\left (1-x^2\right )^2 \left (a+b-a x^2\right )} \, dx,x,\sin (e+f x)\right )}{f}\\ &=\frac {\sec (e+f x) \tan (e+f x)}{2 b f}+\frac {\operatorname {Subst}\left (\int \frac {-a+b-a x^2}{\left (1-x^2\right ) \left (a+b-a x^2\right )} \, dx,x,\sin (e+f x)\right )}{2 b f}\\ &=\frac {\sec (e+f x) \tan (e+f x)}{2 b f}+\frac {a^2 \operatorname {Subst}\left (\int \frac {1}{a+b-a x^2} \, dx,x,\sin (e+f x)\right )}{b^2 f}-\frac {(2 a-b) \operatorname {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\sin (e+f x)\right )}{2 b^2 f}\\ &=-\frac {(2 a-b) \tanh ^{-1}(\sin (e+f x))}{2 b^2 f}+\frac {a^{3/2} \tanh ^{-1}\left (\frac {\sqrt {a} \sin (e+f x)}{\sqrt {a+b}}\right )}{b^2 \sqrt {a+b} f}+\frac {\sec (e+f x) \tan (e+f x)}{2 b f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 6.12, size = 1195, normalized size = 13.90 \[ \frac {(\cos (2 (e+f x)) a+a+2 b) \sec ^2(e+f x) \left (\frac {2 i \tan ^{-1}\left (\frac {2 \sin (e) \left (\sin (2 e) a+i a-i \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \sin (f x) \sqrt {a}-i \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \sin (2 e+f x) \sqrt {a}+\sqrt {a+b} \cos (f x) \sqrt {(\cos (e)-i \sin (e))^2} \sqrt {a}-\sqrt {a+b} \cos (2 e+f x) \sqrt {(\cos (e)-i \sin (e))^2} \sqrt {a}+i b+i (a+b) \cos (2 e)+b \sin (2 e)\right )}{i (a+3 b) \cos (e)+i (a+b) \cos (3 e)+i a \cos (e+2 f x)+i a \cos (3 e+2 f x)+3 a \sin (e)+b \sin (e)+a \sin (3 e)+b \sin (3 e)+a \sin (e+2 f x)-a \sin (3 e+2 f x)}\right ) \sqrt {(\cos (e)-i \sin (e))^2} (\cos (e)+i \sin (e)) a^{3/2}}{\sqrt {a+b}}-\frac {i \log \left (-\cos (2 (e+f x)) a-2 i \sin (2 e) a+a+2 \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \sin (f x) \sqrt {a}+2 \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \sin (2 e+f x) \sqrt {a}+2 (a+b) \cos (2 e)-2 i b \sin (2 e)\right ) \sin (e) a^{3/2}}{\sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2}}+\frac {i \log \left (\cos (2 (e+f x)) a+2 i \sin (2 e) a-a+2 \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \sin (f x) \sqrt {a}+2 \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \sin (2 e+f x) \sqrt {a}-2 (a+b) \cos (2 e)+2 i b \sin (2 e)\right ) \sin (e) a^{3/2}}{\sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2}}+\frac {2 \tan ^{-1}\left (\frac {(a+b) \sin (e)}{(a+b) \cos (e)-\sqrt {a} \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} (\cos (2 e)+i \sin (2 e)) \sin (e+f x)}\right ) \sqrt {(\cos (e)-i \sin (e))^2} (\sin (e)-i \cos (e)) a^{3/2}}{\sqrt {a+b}}+\frac {\cos (e) \log \left (-\cos (2 (e+f x)) a-2 i \sin (2 e) a+a+2 \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \sin (f x) \sqrt {a}+2 \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \sin (2 e+f x) \sqrt {a}+2 (a+b) \cos (2 e)-2 i b \sin (2 e)\right ) a^{3/2}}{\sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2}}-\frac {\cos (e) \log \left (\cos (2 (e+f x)) a+2 i \sin (2 e) a-a+2 \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \sin (f x) \sqrt {a}+2 \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \sin (2 e+f x) \sqrt {a}-2 (a+b) \cos (2 e)+2 i b \sin (2 e)\right ) a^{3/2}}{\sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2}}+4 \log \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right ) a-4 \log \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right ) a-2 b \log \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )+2 b \log \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )+\frac {b}{\left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )^2}-\frac {b}{\left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^2}\right )}{8 b^2 f \left (b \sec ^2(e+f x)+a\right )} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.99, size = 272, normalized size = 3.16 \[ \left [\frac {2 \, a \sqrt {\frac {a}{a + b}} \cos \left (f x + e\right )^{2} \log \left (-\frac {a \cos \left (f x + e\right )^{2} - 2 \, {\left (a + b\right )} \sqrt {\frac {a}{a + b}} \sin \left (f x + e\right ) - 2 \, a - b}{a \cos \left (f x + e\right )^{2} + b}\right ) - {\left (2 \, a - b\right )} \cos \left (f x + e\right )^{2} \log \left (\sin \left (f x + e\right ) + 1\right ) + {\left (2 \, a - b\right )} \cos \left (f x + e\right )^{2} \log \left (-\sin \left (f x + e\right ) + 1\right ) + 2 \, b \sin \left (f x + e\right )}{4 \, b^{2} f \cos \left (f x + e\right )^{2}}, -\frac {4 \, a \sqrt {-\frac {a}{a + b}} \arctan \left (\sqrt {-\frac {a}{a + b}} \sin \left (f x + e\right )\right ) \cos \left (f x + e\right )^{2} + {\left (2 \, a - b\right )} \cos \left (f x + e\right )^{2} \log \left (\sin \left (f x + e\right ) + 1\right ) - {\left (2 \, a - b\right )} \cos \left (f x + e\right )^{2} \log \left (-\sin \left (f x + e\right ) + 1\right ) - 2 \, b \sin \left (f x + e\right )}{4 \, b^{2} f \cos \left (f x + e\right )^{2}}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.64, size = 141, normalized size = 1.64 \[ \frac {a^{2} \arctanh \left (\frac {a \sin \left (f x +e \right )}{\sqrt {\left (a +b \right ) a}}\right )}{f \,b^{2} \sqrt {\left (a +b \right ) a}}-\frac {1}{4 f b \left (-1+\sin \left (f x +e \right )\right )}+\frac {\ln \left (-1+\sin \left (f x +e \right )\right ) a}{2 f \,b^{2}}-\frac {\ln \left (-1+\sin \left (f x +e \right )\right )}{4 f b}-\frac {1}{4 f b \left (1+\sin \left (f x +e \right )\right )}-\frac {\ln \left (1+\sin \left (f x +e \right )\right ) a}{2 f \,b^{2}}+\frac {\ln \left (1+\sin \left (f x +e \right )\right )}{4 f b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.45, size = 124, normalized size = 1.44 \[ -\frac {\frac {2 \, a^{2} \log \left (\frac {a \sin \left (f x + e\right ) - \sqrt {{\left (a + b\right )} a}}{a \sin \left (f x + e\right ) + \sqrt {{\left (a + b\right )} a}}\right )}{\sqrt {{\left (a + b\right )} a} b^{2}} + \frac {{\left (2 \, a - b\right )} \log \left (\sin \left (f x + e\right ) + 1\right )}{b^{2}} - \frac {{\left (2 \, a - b\right )} \log \left (\sin \left (f x + e\right ) - 1\right )}{b^{2}} + \frac {2 \, \sin \left (f x + e\right )}{b \sin \left (f x + e\right )^{2} - b}}{4 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.95, size = 591, normalized size = 6.87 \[ \frac {b\,\left (a\,\sin \left (e+f\,x\right )-a\,\mathrm {atanh}\left (\sin \left (e+f\,x\right )\right )+a\,{\sin \left (e+f\,x\right )}^2\,\mathrm {atanh}\left (\sin \left (e+f\,x\right )\right )\right )+b^2\,\left (\sin \left (e+f\,x\right )+\mathrm {atanh}\left (\sin \left (e+f\,x\right )\right )-{\sin \left (e+f\,x\right )}^2\,\mathrm {atanh}\left (\sin \left (e+f\,x\right )\right )\right )-2\,a^2\,\mathrm {atanh}\left (\sin \left (e+f\,x\right )\right )+2\,a^2\,{\sin \left (e+f\,x\right )}^2\,\mathrm {atanh}\left (\sin \left (e+f\,x\right )\right )+\mathrm {atan}\left (\frac {-a\,\sin \left (e+f\,x\right )\,{\left (a^4+b\,a^3\right )}^{3/2}\,8{}\mathrm {i}-b\,\sin \left (e+f\,x\right )\,{\left (a^4+b\,a^3\right )}^{3/2}\,4{}\mathrm {i}+a^5\,\sin \left (e+f\,x\right )\,\sqrt {a^4+b\,a^3}\,8{}\mathrm {i}-a^2\,b^3\,\sin \left (e+f\,x\right )\,\sqrt {a^4+b\,a^3}\,2{}\mathrm {i}+a^3\,b^2\,\sin \left (e+f\,x\right )\,\sqrt {a^4+b\,a^3}\,1{}\mathrm {i}+a\,b^4\,\sin \left (e+f\,x\right )\,\sqrt {a^4+b\,a^3}\,1{}\mathrm {i}+a^4\,b\,\sin \left (e+f\,x\right )\,\sqrt {a^4+b\,a^3}\,12{}\mathrm {i}}{3\,a^5\,b^2+5\,a^4\,b^3+a^3\,b^4-a^2\,b^5}\right )\,\sqrt {a^4+b\,a^3}\,2{}\mathrm {i}-\mathrm {atan}\left (\frac {-a\,\sin \left (e+f\,x\right )\,{\left (a^4+b\,a^3\right )}^{3/2}\,8{}\mathrm {i}-b\,\sin \left (e+f\,x\right )\,{\left (a^4+b\,a^3\right )}^{3/2}\,4{}\mathrm {i}+a^5\,\sin \left (e+f\,x\right )\,\sqrt {a^4+b\,a^3}\,8{}\mathrm {i}-a^2\,b^3\,\sin \left (e+f\,x\right )\,\sqrt {a^4+b\,a^3}\,2{}\mathrm {i}+a^3\,b^2\,\sin \left (e+f\,x\right )\,\sqrt {a^4+b\,a^3}\,1{}\mathrm {i}+a\,b^4\,\sin \left (e+f\,x\right )\,\sqrt {a^4+b\,a^3}\,1{}\mathrm {i}+a^4\,b\,\sin \left (e+f\,x\right )\,\sqrt {a^4+b\,a^3}\,12{}\mathrm {i}}{3\,a^5\,b^2+5\,a^4\,b^3+a^3\,b^4-a^2\,b^5}\right )\,{\sin \left (e+f\,x\right )}^2\,\sqrt {a^4+b\,a^3}\,2{}\mathrm {i}}{f\,\left (-2\,b^3\,{\sin \left (e+f\,x\right )}^2+2\,b^3-2\,a\,b^2\,{\sin \left (e+f\,x\right )}^2+2\,a\,b^2\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\sec ^{5}{\left (e + f x \right )}}{a + b \sec ^{2}{\left (e + f x \right )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________